// 部分样式来源于其他开源UI库
@import '@vavt/markdown-theme/css/all.css';
@import '~/styles/vars.less';
@import '~~/MdCatalog/index.less';

.@{prefix} {
  .css-vars(false);

  width: 100%;
  height: 500px;
  position: relative;
  box-sizing: border-box;
  border: 1px solid var(--md-border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--md-color);
  background-color: var(--md-bk-color);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI',
    system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji';

  /* 浏览器滚动条 */
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  ::-webkit-scrollbar-corner,
  ::-webkit-scrollbar-track {
    background-color: var(--md-scrollbar-bg-color);
  }

  ::-webkit-scrollbar-thumb {
    border-radius: 2px;
    background-color: var(--md-scrollbar-thumb-color);
  }

  ::-webkit-scrollbar-button:vertical {
    display: none;
  }

  ::-webkit-scrollbar-thumb:vertical:hover {
    background-color: var(--md-scrollbar-thumb-hover-color);
  }

  ::-webkit-scrollbar-thumb:vertical:active {
    background-color: var(--md-scrollbar-thumb-active-color);
  }

  .@{prefix}-fullscreen {
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto !important;
    height: auto !important;
    z-index: 10000;
  }

  &-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    overflow: hidden;
    display: block;
  }

  & &-iconfont {
    font-size: 24px;
    width: 24px;
    height: 24px;
    display: block;
  }

  &-preview-wrapper {
    position: relative;
    flex: 1;
    box-sizing: border-box;
    overflow: auto;
    padding: 10px 20px;
  }

  &-preview {
    font-size: 16px;
    word-break: break-all;
  }

  [data-show='false'] {
    display: none;
  }
}

.@{prefix}-previewOnly {
  border: none;
  height: auto;

  .@{prefix}-content {
    height: 100%;
  }

  .@{prefix}-preview {
    padding: 0;
  }
}

.@{prefix}-dark {
  .css-vars(true);
}

// 图片预览优先级高于编辑器，低于编辑器弹窗
.medium-zoom-overlay,
.medium-zoom-image--opened {
  z-index: 100001;
}
